<?php

namespace app\supermanager\model;

use think\Model;
use app\common\traits\model\TraitModel;

/**
 * 房车国别模型
 */
class CarCountries extends Model
{
    use TraitModel;

    public static function tableLog($a, $u)
    {
    	//\think\Db::table('logs')->insert(['user_id' => self::getLoginUserInfo('id'), 'type' => $a, 'remark' => json_encode($u)]);
    }
	/**
	 * [countries description]
	 * @return [type] [description]
	 */
    public function countries()
	{
		return self::column('name', 'id');
	}
	/**
	 * [addInfo description]
	 * @param array $info_array [description]
	 */
	public function addInfo($info_array = [])
	{
		return self::create($info_array, true);
	}
	public function updateInfo($info_array = [], $where = [])
	{
		return self::update($info_array, $where, true);
	}
	/**
	 * [delInfo description]
	 * @param  [type] $id [description]
	 * @return [type]     [description]
	 */
	public function delInfo($id)
	{
		return self::destroy($id);
	}
}
